TopClient = require('../../src/topClient').ApiClient;
var client = new TopClient({
    'appkey': '23767920',
    'appsecret': '7e98c062b02ffc4a70e483e6485d2969',
    'REST_URL': 'http://gw.api.taobao.com/router/rest'
});


// client.execute('taobao.wireless.share.tpwd.query', {
//     'password_content': '【我剁手都要买的宝贝（天堂伞超大号男女双人晴雨伞学生三折叠加固两用遮阳伞旗舰店官网），快来和我一起瓜分红I包】，复制这条信息￥vdaj0qCZ8MT￥后打开👉手淘👈'
// }, function (error, response) {
//     if (!error) console.log(response);
//     else console.log(error);
// });

// client.execute('taobao.tbk.item.get', {
//     'fields': 'num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url,seller_id,volume,nick,shop_title,zk_final_price_wap,event_start_time,event_end_time,tk_rate,type,status',
//     'q': '2018夏季新款雪纺半身裙女中长款宽松学生chic百褶裙软妹小仙女裙'
// }, function (error, response) {
//     if (!error) console.log(response.results.n_tbk_item);
//     else console.log(error);
// })

// client.execute('taobao.tbk.item.recommend.get', {
//     'fields':'num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url',
//     'num_iid':'566315135770',
//     'count':'20',
//     'platform':'1'
// }, function(error, response) {
//     if (!error) console.log(response.results.n_tbk_item);
//     else console.log(error);
// })

//mm_122710156_24210763_388088906
// client.execute('taobao.tbk.dg.material.optional', {
//     'q': '夏季冰丝沙发垫凉席夏天凉垫欧式客厅组合坐垫全包沙发套贵妃定做',
//     'adzone_id': '388088906'
// }, function (error, response) {
//     if (!error) console.log(response.result_list.map_data);
//     else console.log(error);
// })

client.execute('taobao.tbk.coupon.get', {
    'item_id':'523098242044',
    'activity_id':'048c78e7507a44bbb8bc50228e1dd595'
}, function(error, response) {
    if (!error) console.log(response);
    else console.log(error);
})